<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"    
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets">
 
    <h:head>
    	<title>Amanajé</title>
    	<h:outputStylesheet name="css/crud.css"/>
    	<h:outputScript name="js/crud.js"/>
    </h:head>
    
    <h:body>
		<h:outputText value="Gerenciamento de Usuários" class="header"/>
		
		<br/> <br/>
		
		<fieldset>
		
			<legend>Painel de Controle</legend>
			
				<h:panelGrid columns="2">
				
					<h:commandButton value="Criar Usuário" onclick="showdiv('div_cadastro')"/>
					
					<h:commandButton value="Listar Usuários" onclick="showdiv('div_listagem')"/>
					
					<h:commandButton value="Atualizar Usuário" onclick="showdiv('div_atualizacao')"/>
					
					<h:commandButton value="Remover Usuário" onclick="showdiv('div_remocao')"/>
					
				</h:panelGrid>
			
		</fieldset>
    	
    	<br/> <br/>
    	
    	<fieldset>
    	
    		<legend>Painel de Operações</legend>
		    
		    <ui:include src="criar.xhtml"/>	
		    
		    <ui:include src="atualizar.xhtml"/>
		    
		    <ui:include src="listar.xhtml"/>
		    
		    <ui:include src="remover.xhtml"/>	
		    		
    	</fieldset>
    	
    	<h:messages/>
    	
    	<div id="msg_sucesso"> 
    		<h:outputText value="Operação Efetuada com Sucesso!" rendered="#{usuarioBean.exibirMensagemSucesso}"/>
    		<h:outputText value="Nenhum usuário foi encontrado!" rendered="#{usuarioBean.exibirMensagemFalhaBusca}"/>
    	</div>
	    	
    </h:body>
    
</html>
